package com.jxpanda.spring.module.wechat.component.message.handler;

import com.jxpanda.spring.module.wechat.component.message.pojo.WechatXmlMessage;
import reactor.core.publisher.Mono;

/**
 * @author Panda
 */
public interface WechatReceivedXmlMessageHandler<M extends WechatXmlMessage> {

    /**
     * 返回消息类型
     *
     * @return 消息类型
     */
    String msgType();

    /**
     * 处理消息
     *
     * @param message 消息
     * @return 处理结果
     */
    Mono<Object> apply(M message);

}
